package com.yuntuzhilian.chapter1;

import java.util.LinkedList;
import java.util.List;

/**
 * @author MrWang-shuizhishuiheshui
 * @description
 */
public class Demo3 {
    public static void main(String[] args) {
        //创建LinkedList对象
        LinkedList<String> names=new LinkedList<>();

        names.add("张三");
        names.add("李四");
        names.add("王五");
        //
        names.addFirst("田七");
        names.removeLast();
        for (String name : names) {
            System.out.println(name);
        }

    }
}
